"""
@Project:take_out_project
@File:PYmysql.py
@Author:袁浩天
@Date:12:39
"""

import pymysql
class PYMysql():
    def __init__(self):
        count = pymysql.connect(
            host="127.0.0.1",
            port=3306,
            user="root",
            password="123",
            db="take_out",
            charset=True
        )
        db = count.cursor()
        sql = f"insert into food_tb(url,name,seasoning) values ('d://day726//pic//s113291_154088128763034.jpg','水煮肉片','猪里脊,豆芽,郫县豆瓣酱')"
        db.execute(sql)
        count.commit()
        count.close()

        











